package codebot.processor;

/**
 * This represents an interface for YOUR class, the one that will actually call
 * the highlighting.
 * 
 * @author Teo
 * 
 */
public interface IScreen {
  /**
   * Returns the text (code) to be processed.
   * 
   * @return
   */
  String getText();

  /**
   * Returns the text in the given interval
   * 
   * @return
   */
  String getText(int start, int end);

  /**
   * Insert a string at the specified location
   * 
   * @param where
   * @param what
   */
  void insert(int where, String what);

  /**
   * Takes care of logging messages and displaying them (on the actual screen or
   * whatever debugging/logging system)
   * 
   * @param message
   */
  void log(String message);

  /**
   * Replaces text existing between start and end with newText.
   * 
   * @param start
   * @param end
   * @param newText
   */
  void replace(int start, int end, String newText);

  /**
   * Makes the text bold or normal in the given interval.
   * 
   * @param b
   * @param start
   * @param end
   */
  void setBold(boolean b, int start, int end);

  /**
   * Sets the color in a certain interval.
   * 
   * @param rgb
   *          should be something like "rgb(100,30,20)"
   * @param start
   * @param end
   */
  void setColor(String rgb, int start, int end);

  /**
   * Sets the font in a certain interval.
   * 
   * @param font
   *          e.g. "Courier New"
   * @param start
   * @param end
   */
  void setFont(String font, int start, int end);

  /**
   * Sets the text to italic (or not) in a given interval
   * 
   * @param b
   * @param start
   * @param end
   */
  void setItalic(boolean b, int start, int end);
}
